IWR1843: frame 配置错误

您所在的位置:网站首页 frame configuration IWR1843: frame 配置错误

IWR1843: frame 配置错误

2024-07-17 22:11| 来源: 网络整理| 查看: 265

Part Number: IWR1843

你好,我加入以下配置代码,发现运行到retVal = rlSetFrameConfig(RL_DEVICE_MAP_INTERNAL_BSS, &FrameCfg);出现错误

static int32_t Adcdata_MSS_AdvancedFrameCfg (){ MMWave_OpenCfg openCfg; int32_t errCode; rlProfileCfg_t profileCfg; rlChirpCfg_t chirpCfg; rlAdvFrameCfg_t advFrameCfg; rlFrameCfg_t FrameCfg; int32_t retVal; rlRfLdoBypassCfg_t rfLdoBypassCfg[1] = {0};

if (gAdcdataMSSMCB.cfgStatus == true) { /* Radar has already been configured. */ return 0; }

// retVal=rlSensorStop(RL_DEVICE_MAP_INTERNAL_BSS);// if (retVal != RL_RET_CODE_OK)// {// System_printf ("STOP failed [Error %d]\n", retVal);// return -1;// }

/* Setup the calibration frequency: */ openCfg.freqLimitLow = 760U; openCfg.freqLimitHigh = 810U; openCfg.defaultAsyncEventHandler = MMWave_DefaultAsyncEventHandler_MSS;

/* Initialize the minimal configuration: */ Cfg_ChannelCfgInitParams (&openCfg.chCfg); Cfg_LowPowerModeInitParams(&openCfg.lowPowerMode); Cfg_ADCOutCfgInitParams (&openCfg.adcOutCfg); openCfg.calibMonTimeUnit=1;//增加代码 /* Open the mmWave module: */ if (MMWave_open (gAdcdataMSSMCB.ctrlHandle, &openCfg, NULL, &errCode) < 0) { System_printf ("Error: MMWDemoMSS mmWave open configuration failed [Error code %d]\n", errCode); return -1; }

System_printf ("Set LDO Bypass\n"); rfLdoBypassCfg->ldoBypassEnable = 0x03; retVal = rlRfSetLdoBypassConfig(RL_DEVICE_MAP_INTERNAL_BSS, (rlRfLdoBypassCfg_t*)rfLdoBypassCfg); if (retVal != RL_RET_CODE_OK) { System_printf ("Error: LDO Bypass config failed [Error %d]\n", retVal); return -1; }

/******************************************************************************** * MMWave Link and BSS is operational now. In minimal mode we have access to all * the mmWave Link API to perform the configuration * * Profile configurations: ********************************************************************************/ Cfg_ProfileCfgInitParams (&profileCfg); retVal = rlSetProfileConfig (RL_DEVICE_MAP_INTERNAL_BSS, 1U, &profileCfg); if (retVal != RL_RET_CODE_OK) { System_printf ("Error: Unable to configure the profile [Error %d]\n", retVal); return -1; }

/******************************************************************************** * Chirp configurations: ********************************************************************************/ Cfg_ChirpCfgInitParams (&chirpCfg); retVal = rlSetChirpConfig(RL_DEVICE_MAP_INTERNAL_BSS, 1U, &chirpCfg); if (retVal != RL_RET_CODE_OK) { System_printf ("Error: Unable to configure chirp [Error %d]\n", retVal); return -1; }

// /* Advanced Frame configuration. */// Cfg_AdvFrameCfgInitParams (&advFrameCfg);// retVal = rlSetAdvFrameConfig(RL_DEVICE_MAP_INTERNAL_BSS, &advFrameCfg);// if (retVal != RL_RET_CODE_OK)// {// System_printf ("Error: Advanced Frame configuration failed [Error %d]\n", retVal);// return -1;// }

/* Frame configuration. */ Cfg_FrameCfgInitParams (&FrameCfg); retVal = rlSetFrameConfig(RL_DEVICE_MAP_INTERNAL_BSS, &FrameCfg); if (retVal != RL_RET_CODE_OK) { System_printf ("Error: Frame configuration failed [Error %d]\n", retVal); return -1; }

/* The link has been configured. */ gAdcdataMSSMCB.cfgStatus = true; System_printf ("Debug: MMWave has been configured for MRR.\n"); return 0;}

static void Cfg_FrameCfgInitParams (rlFrameCfg_t* ptrFrameCfg){ /* Initialize the configuration: */ memset ((void*)ptrFrameCfg, 0, sizeof(rlFrameCfg_t));

ptrFrameCfg->chirpStartIdx=0; ptrFrameCfg->chirpEndIdx=0; ptrFrameCfg->numLoops=1; ptrFrameCfg->numFrames=0; ptrFrameCfg->framePeriodicity=500000000; ptrFrameCfg->triggerSelect=1; ptrFrameCfg->frameTriggerDelay=0;

return;}



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3